<?php

require_once('boot.php');

$gateway->auth();

$args = $_SERVER['argv'];

array_shift($args);
$to = array_shift($args);
$text = join(' ', $args);

$message = $gateway->createMessage();
$message->setTo($to);
$message->setText($text);
$message->setFrom(FROM_NUMBER);

$message_status = $message->send();

echo "Message sent successfully\n";
echo "To: $message_status[to] Api Msg ID: $message_status[apimsgid]\n";